package com.itheima.test;

import java.util.Scanner;

/**
 * @Author 王加鑫
 * @Date 2021/4/19 16:43
 * @Version 1.0
 * 跳出循环控制语句 break(直接终止循环)
 */
public class BreakTest01 {
    public static void main(String[] args) {
        lo:while (true){
            Scanner sc = new Scanner(System.in);
            System.out.println("退出系统请按0号建");
            System.out.println("请输入星期数:");
            int week = sc.nextInt();
            switch (week){
                case 0:
                    System.out.println("感谢您的使用!");
                    break lo;
                case 1:
                    System.out.println("跑步");
                    break;
                case 2:
                    System.out.println("游泳");
                    break;
                case 3:
                    System.out.println("慢走");
                    break;
                case 4:
                    System.out.println("动感单车");
                    break;
                case 5:
                    System.out.println("拳击");
                    break;
                case 6:
                    System.out.println("爬山");
                    break;
                case 7:
                    System.out.println("好好吃一顿");
                    continue;
                default:
                    System.out.println("您输入有误");
            }
        }
    }
}
